<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: mnkey.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00782.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">mnkey.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03629_source.html">precomp.h</a>&quot;</code><br />
</div>
<p><a href="a00782_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a22547da4c83710b41b24238494ba941b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00782.html#a22547da4c83710b41b24238494ba941b">CMDSWITCH</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a22547da4c83710b41b24238494ba941b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd2da39bb336a27d9c62880dbbfee891"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00782.html#afd2da39bb336a27d9c62880dbbfee891">CMDQUERY</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:afd2da39bb336a27d9c62880dbbfee891"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a62c64e13711fe7f194b1fe96b7ef702f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00782.html#a62c64e13711fe7f194b1fe96b7ef702f">xxxClientFindMnemChar</a> (PUNICODE_STRING pstrSrc, WCHAR ch, BOOL fFirst, BOOL fPrefix)</td></tr>
<tr class="separator:a62c64e13711fe7f194b1fe96b7ef702f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7379c189876b00e2e991b2171dd0264a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00782.html#a7379c189876b00e2e991b2171dd0264a">MNFindNextValidItem</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, int i, int dir, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> flags)</td></tr>
<tr class="separator:a7379c189876b00e2e991b2171dd0264a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae00d2d3aa5d08ddfa558c49988b68d01"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00782.html#ae00d2d3aa5d08ddfa558c49988b68d01">MNFindItemInColumn</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> idxB, int dir, BOOL fRoot)</td></tr>
<tr class="separator:ae00d2d3aa5d08ddfa558c49988b68d01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0a4845fa9737461012b96b73ddfc441"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00782.html#ad0a4845fa9737461012b96b73ddfc441">MNFindChar</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> ch, int idxC, LPINT lpr)</td></tr>
<tr class="separator:ad0a4845fa9737461012b96b73ddfc441"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a719c164980561a97791e344154c3ef7b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00782.html#a719c164980561a97791e344154c3ef7b">xxxMNKeyFilter</a> (<a class="el" href="a00365.html#afec8825ff7db21bd65d8f584c1578258">PPOPUPMENU</a> ppopupMenu, <a class="el" href="a00899.html#a5af719923cbc128d4841b3b35ff88a75">PMENUSTATE</a> pMenuState, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> ch)</td></tr>
<tr class="separator:a719c164980561a97791e344154c3ef7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">宏定义说明</h2>
<a id="afd2da39bb336a27d9c62880dbbfee891"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd2da39bb336a27d9c62880dbbfee891">&#9670;&nbsp;</a></span>CMDQUERY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CMDQUERY&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00782_source.html">mnkey.c</a> 第 <a class="el" href="a00782_source.html#l00024">24</a> 行定义.</p>

</div>
</div>
<a id="a22547da4c83710b41b24238494ba941b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22547da4c83710b41b24238494ba941b">&#9670;&nbsp;</a></span>CMDSWITCH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CMDSWITCH&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00782_source.html">mnkey.c</a> 第 <a class="el" href="a00782_source.html#l00023">23</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="ad0a4845fa9737461012b96b73ddfc441"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0a4845fa9737461012b96b73ddfc441">&#9670;&nbsp;</a></span>MNFindChar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> MNFindChar </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>ch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idxC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPINT&#160;</td>
          <td class="paramname"><em>lpr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00782_source.html">mnkey.c</a> 第 <a class="el" href="a00782_source.html#l00214">214</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;{</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <span class="keywordtype">int</span> idxFirst = MFMWFP_NOITEM;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordtype">int</span> idxB;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keywordtype">int</span> idxF;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keywordtype">int</span> rT;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    LPWSTR lpstr;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="a02621.html">PITEM</a> pItem;</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160; </div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    <span class="keywordflow">if</span> (ch == 0)</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160; </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="comment">     * First time thru go for the very first menu.</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    idxF = MFMWFP_NOITEM;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    rT = 0;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    idxB = idxC;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160; </div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <span class="keywordflow">if</span> (idxB &lt; 0)</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;<span class="comment">//    if (idxB &amp; 0x8000)</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        idxB = <a class="code" href="a00782.html#a7379c189876b00e2e991b2171dd0264a">MNFindNextValidItem</a>(pMenu, pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>, MFMWFP_NOITEM, MNF_DONTSKIPSEPARATORS);</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> idxPrev;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        idxPrev = idxC;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        idxC = <a class="code" href="a00782.html#a7379c189876b00e2e991b2171dd0264a">MNFindNextValidItem</a>(pMenu, idxC, 1, MNF_DONTSKIPSEPARATORS);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="keywordflow">if</span> (idxC == MFMWFP_NOITEM || idxC == idxFirst)</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        <span class="keywordflow">if</span> (idxFirst == MFMWFP_NOITEM)</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;            idxFirst = idxC;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160; </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        pItem = &amp;pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[idxC];</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160; </div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        <span class="keywordflow">if</span> (pItem-&gt;<a class="code" href="a02621.html#a8ddffda03875be635307092e985f7066">lpstr</a>) {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        <span class="keywordflow">if</span> (!TestMFT(pItem, MFT_NONSTRING) &amp;&amp;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                (pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> != NULL)) {</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <span class="keywordflow">if</span> (pItem-&gt;<a class="code" href="a02621.html#a1d342ea14e69d5eb171aa039c9bc4642">cch</a> != 0) {</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                UNICODE_STRING strMnem;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                lpstr = TextPointer(pItem-&gt;<a class="code" href="a02621.html#a8ddffda03875be635307092e985f7066">lpstr</a>);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                lpstr = TextPointer(pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a>);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                <span class="keywordflow">if</span> (*lpstr == CH_HELPPREFIX) {</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160; </div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                    <span class="comment">/*</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;<span class="comment">                     * Skip help prefix if it is there so that we can mnemonic</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<span class="comment">                     * to the first character of a right justified string.</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;<span class="comment">                     */</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                    lpstr++;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;                }</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160; </div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;                RtlInitUnicodeString(&amp;strMnem, lpstr);</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;                <span class="keywordflow">if</span> (((rT = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)<a class="code" href="a00782.html#a62c64e13711fe7f194b1fe96b7ef702f">xxxClientFindMnemChar</a>(&amp;strMnem,</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                        (WCHAR)ch, TRUE, TRUE)) == 0x0080) &amp;&amp;</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                        (idxF == MFMWFP_NOITEM))</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                    idxF = idxC;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            }</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        }</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <span class="keywordflow">if</span> (idxC == idxPrev) {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;            <span class="keywordflow">break</span>;  <span class="comment">// no progress - break inf. loop</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        }</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    } <span class="keywordflow">while</span> (rT != 1 &amp;&amp; idxB != idxC);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160; </div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    *lpr = rT;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="keywordflow">if</span> (rT == 1)</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        <span class="keywordflow">return</span> idxC;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="keywordflow">return</span> idxF;</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01972">tagITEM::cch</a>, <a class="el" href="a00365_source.html#l02000">tagMENU::cItems</a>, <a class="el" href="a00365_source.html#l01968">tagITEM::hTypeData</a>, <a class="el" href="a00365_source.html#l01966">tagITEM::lpstr</a>, <a class="el" href="a00782_source.html#l00034">MNFindNextValidItem()</a>, <a class="el" href="a00365_source.html#l02005">tagMENU::rgItems</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00782.html#a62c64e13711fe7f194b1fe96b7ef702f">xxxClientFindMnemChar()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03590_source.html#l00241">xxxMNChar()</a>.</p>

</div>
</div>
<a id="ae00d2d3aa5d08ddfa558c49988b68d01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae00d2d3aa5d08ddfa558c49988b68d01">&#9670;&nbsp;</a></span>MNFindItemInColumn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> MNFindItemInColumn </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>idxB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dir</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fRoot</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00782_source.html">mnkey.c</a> 第 <a class="el" href="a00782_source.html#l00145">145</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;{</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordtype">int</span> dxMin;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordtype">int</span> dyMin;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordtype">int</span> dxMax;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keywordtype">int</span> dyMax;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordtype">int</span> xB;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keywordtype">int</span> yB;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> idxE;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> idxR;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> cItems;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <a class="code" href="a02621.html">PITEM</a> pItem;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    cItems = pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    idxR = MFMWFP_NOITEM;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    idxE = <a class="code" href="a00782.html#a7379c189876b00e2e991b2171dd0264a">MNFindNextValidItem</a>(pMenu, MFMWFP_NOITEM, dir, 0);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">if</span> (idxE == -1)</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordflow">goto</span> End;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    dxMin = dyMin = 20000;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keywordflow">if</span> (idxB &gt;= pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>)</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordflow">return</span> idxR;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    pItem = &amp;pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[idxB];</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    xB = pItem-&gt;<a class="code" href="a02621.html#a1bd951bbc5c909b8bd138b83ddfe31bd">xItem</a>;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    yB = pItem-&gt;<a class="code" href="a02621.html#add79d19081e05aa07fece764c9cc07b5">yItem</a>;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="keywordflow">while</span> (cItems-- &gt; 0 &amp;&amp;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;            (idxB = <a class="code" href="a00782.html#a7379c189876b00e2e991b2171dd0264a">MNFindNextValidItem</a>(pMenu, idxB, dir, 0)) != idxE) {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        pItem = &amp;pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[idxB];</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        dxMax = xB - pItem-&gt;<a class="code" href="a02621.html#a1bd951bbc5c909b8bd138b83ddfe31bd">xItem</a>;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        dyMax = yB - pItem-&gt;<a class="code" href="a02621.html#add79d19081e05aa07fece764c9cc07b5">yItem</a>;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordflow">if</span> (dxMax &lt; 0)</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            dxMax = (-dxMax);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordflow">if</span> (dyMax &lt; 0)</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            dyMax = (-dyMax);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="comment">// See if this item is nearer than the last item found</span></div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="comment">// --------------------------------------------------------</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="comment">// (fRoot || dxMax) -- this condition means that if it&#39;s</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="comment">// not the actual menu bar menu that we&#39;re dealing with,</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <span class="comment">// then the item below/above (same X value as) the selected</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <span class="comment">// item is not a valid one to move to</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        <span class="keywordflow">if</span> ((dyMax &lt; dyMin) &amp;&amp; (fRoot || dxMax) &amp;&amp; dxMax &lt;= dxMin) {</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            dxMin = dxMax;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;            dyMin = dyMax;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;            idxR = idxB;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    }</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;End:</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="keywordflow">return</span> idxR;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l02000">tagMENU::cItems</a>, <a class="el" href="a00782_source.html#l00034">MNFindNextValidItem()</a>, <a class="el" href="a00365_source.html#l02005">tagMENU::rgItems</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>, <a class="el" href="a00365_source.html#l01974">tagITEM::xItem</a> , 以及 <a class="el" href="a00365_source.html#l01975">tagITEM::yItem</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03590_source.html#l00457">xxxMNKeyDown()</a>.</p>

</div>
</div>
<a id="a7379c189876b00e2e991b2171dd0264a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7379c189876b00e2e991b2171dd0264a">&#9670;&nbsp;</a></span>MNFindNextValidItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> MNFindNextValidItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dir</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00782_source.html">mnkey.c</a> 第 <a class="el" href="a00782_source.html#l00034">34</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;{</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordtype">int</span> iStart;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    BOOL cont = TRUE;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordtype">int</span> cItems = pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <a class="code" href="a02621.html">PITEM</a> pItem;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordflow">if</span> ((i &lt; 0) &amp;&amp; (dir &gt; 0))</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="comment">// going forward from beginning -- stop after last menu item</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        i = iStart = cItems;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((i &gt;= cItems) &amp;&amp; (dir &lt; 0))</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="comment">// going backward from end -- stop after first menu item</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        i = iStart = -1;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        iStart = i;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">if</span> (!cItems)</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordflow">return</span>(MFMWFP_NOITEM);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="comment">// b#8997 - if we have these conditions and enter</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="comment">// loop will go blistic ( infin )</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="comment">// fix: jump over code and come loop to i == iStart will now stop us</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">if</span> ( ( i == 0 ) &amp;&amp; ( cItems == 1 ) &amp;&amp; ( dir &gt; 0 ) )</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    {</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        dir = 0;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordflow">goto</span> artsquickndirtybugfix;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    }</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="comment">// Loop thru menu items til (1) we find a valid item</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="comment">//                       or (2) we make it back to the start item (iStart)</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordflow">while</span> (TRUE) {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        i += dir;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">if</span> ((i == iStart) || (dir == 0))</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <span class="comment">// we made it back to start item -- return NOT FOUND</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            <span class="keywordflow">return</span> MFMWFP_NOITEM;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="comment">// keep &#39;i&#39; in the range: 0 &lt;= i &lt; cItems</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">if</span> (i &gt;= cItems) {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            i = -1;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (i &lt; 0) {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            i = cItems;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        }</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;artsquickndirtybugfix:</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        pItem = pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a> + i;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="comment">//        if (pItem-&gt;hTypeData == NULL) {</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="comment">// skip ownerdraw - seperators even though there not NULL</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keywordflow">if</span> ((</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;#<span class="keywordflow">else</span> <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordflow">if</span> ((pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> == NULL) || (TestMFT(pItem, MFT_OWNERDRAW) &amp;&amp;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;#endif <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;              TestMFT(pItem, MFT_SEPARATOR) ) )</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        {</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            <span class="comment">//</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            <span class="comment">// Skip non-separator (if asked) empty items.  With hot-tracking,</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            <span class="comment">// it is acceptable for them to be selected.  In truth, it was possible</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            <span class="comment">// in Win3.1 too, but less likely.</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            <span class="comment">//</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            <span class="keywordflow">if</span> (!(flags &amp; MNF_DONTSKIPSEPARATORS) || !TestMFT(pItem, MFT_SEPARATOR))</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;                <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pItem-&gt;<a class="code" href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">hbmp</a>) {</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;#else <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        } <span class="keywordflow">else</span> if (TestMFT(pItem, MFT_BITMAP)) {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            <span class="comment">//</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            <span class="comment">// Skip close &amp; minimize &amp; restore buttons</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            <span class="comment">//</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            <span class="keywordflow">switch</span> ((<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)(pItem-&gt;<a class="code" href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">hbmp</a>)) {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;#else <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            switch ((UINT)(pItem-&gt;hTypeData)) {</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;#endif <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                case MENUHBM_RESTORE:</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                case MENUHBM_MINIMIZE:</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                case MENUHBM_MINIMIZE_D:</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                case MENUHBM_CLOSE:</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                case MENUHBM_CLOSE_D:</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                    continue;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            }</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="comment">// return index of found item</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="keywordflow">return</span>(i);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="comment">// We should never get here!</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(FALSE);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l02000">tagMENU::cItems</a>, <a class="el" href="a00365_source.html#l01983">tagITEM::hbmp</a>, <a class="el" href="a00365_source.html#l01968">tagITEM::hTypeData</a>, <a class="el" href="a00365_source.html#l02005">tagMENU::rgItems</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00950_source.html#l00117">UserAssert</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00782_source.html#l00214">MNFindChar()</a>, <a class="el" href="a00782_source.html#l00145">MNFindItemInColumn()</a>, <a class="el" href="a03590_source.html#l02538">xxxMenuWindowProc()</a> , 以及 <a class="el" href="a03590_source.html#l00457">xxxMNKeyDown()</a>.</p>

</div>
</div>
<a id="a62c64e13711fe7f194b1fe96b7ef702f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62c64e13711fe7f194b1fe96b7ef702f">&#9670;&nbsp;</a></span>xxxClientFindMnemChar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int xxxClientFindMnemChar </td>
          <td>(</td>
          <td class="paramtype">PUNICODE_STRING&#160;</td>
          <td class="paramname"><em>pstrSrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WCHAR&#160;</td>
          <td class="paramname"><em>ch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fFirst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fPrefix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="reference">被这些函数引用 <a class="el" href="a00782_source.html#l00214">MNFindChar()</a>.</p>

</div>
</div>
<a id="a719c164980561a97791e344154c3ef7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a719c164980561a97791e344154c3ef7b">&#9670;&nbsp;</a></span>xxxMNKeyFilter()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void xxxMNKeyFilter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#afec8825ff7db21bd65d8f584c1578258">PPOPUPMENU</a>&#160;</td>
          <td class="paramname"><em>ppopupMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00899.html#a5af719923cbc128d4841b3b35ff88a75">PMENUSTATE</a>&#160;</td>
          <td class="paramname"><em>pMenuState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>ch</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00782_source.html">mnkey.c</a> 第 <a class="el" href="a00782_source.html#l00320">320</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;{</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    BOOL fLocalInsideMenuLoop = pMenuState-&gt;<a class="code" href="a02885.html#a0153e6fcd0d8052211d17aa193efeab0">fInsideMenuLoop</a>;</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160; </div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    <span class="keywordflow">if</span> (pMenuState-&gt;<a class="code" href="a02885.html#a46148f45192618de6eafbf70310e2aee">fButtonDown</a>) {</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160; </div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;<span class="comment">         * Ignore keystrokes while the mouse is pressed (except ESC).</span></div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    }</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160; </div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    <span class="keywordflow">if</span> (!pMenuState-&gt;<a class="code" href="a02885.html#a0153e6fcd0d8052211d17aa193efeab0">fInsideMenuLoop</a>) {</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160; </div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="comment">         * Need to send the WM_INITMENU message before we pull down the menu.</span></div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="a00794.html#ab74bfcb3daae3ba0497d19d263c8a7f0">xxxMNStartState</a>(ppopupMenu, KEYBDHOLD))</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        pMenuState-&gt;<a class="code" href="a02885.html#a0153e6fcd0d8052211d17aa193efeab0">fInsideMenuLoop</a> = TRUE;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    }</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160; </div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160; </div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    <span class="keywordflow">switch</span> (ch) {</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    <span class="keywordflow">case</span> 0:</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160; </div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="comment">         * If we get a WM_KEYDOWN alt key and then a KEYUP alt key, we need to</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;<span class="comment">         * activate the first item on the menu.  ie.  user hits and releases alt</span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="comment">         * key so just select first item.  USER sends us a SC_KEYMENU with</span></div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;<span class="comment">         * lParam 0 when the user does this.</span></div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <a class="code" href="a03590.html#abc4f96ae1b5b39baaabd801a28a9cc66">xxxMNSelectItem</a>(ppopupMenu, pMenuState, 0);</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160; </div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    <span class="keywordflow">case</span> MENUCHILDSYSMENU:</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <span class="keywordflow">if</span> (!TestwndChild(ppopupMenu-&gt;<a class="code" href="a02837.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>)) {</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160; </div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;<span class="comment">             * Change made to fix MDI problem: child window gets a keymenu,</span></div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="comment">             * and pops up sysmenu of frame when maximized.  Need to act like</span></div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<span class="comment">             * MENUCHAR if hwndMenu is a top-level.</span></div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;            <span class="keywordflow">goto</span> MenuCharHandler;</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;        }</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160; </div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;<span class="comment">         * else fall through.</span></div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160; </div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="keywordflow">case</span> MENUSYSMENU:</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        <span class="keywordflow">if</span> (!TestWF(ppopupMenu-&gt;<a class="code" href="a02837.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>, WFSYSMENU)) {</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;            <a class="code" href="a03605.html#a4f1ae6130c5b61d08ef3cb8156d87333">xxxMessageBeep</a>(0);</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;            <span class="keywordflow">goto</span> MenuCancel;</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;        }</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160; </div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;<span class="comment">         * Popup any hierarchies we have.</span></div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        <a class="code" href="a03590.html#a276dfb2dab9aac12e50a66342a9e68e7">xxxMNCloseHierarchy</a>(ppopupMenu, pMenuState);</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        <span class="keywordflow">if</span> (!ppopupMenu-&gt;<a class="code" href="a02837.html#ae51e1bffcb852e729841b4bb15ed17fc">fIsSysMenu</a> &amp;&amp; ppopupMenu-&gt;<a class="code" href="a02837.html#afbdbf15c6bd60bf9bb21f2f0340c1d14">spmenuAlternate</a>)</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;            <a class="code" href="a03590.html#a834af03196c61def0034c6d4b825efd9">xxxMNSwitchToAlternateMenu</a>(ppopupMenu);</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;        <span class="keywordflow">if</span> (!ppopupMenu-&gt;<a class="code" href="a02837.html#ae51e1bffcb852e729841b4bb15ed17fc">fIsSysMenu</a>) {</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;<span class="comment">             * If no system menu, get out.</span></div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            <span class="keywordflow">goto</span> MenuCancel;</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        }</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160; </div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <a class="code" href="a00794.html#a4c87c0ec6c754e9cd7e4aea0b3b5ce41">MNPositionSysMenu</a>(ppopupMenu-&gt;<a class="code" href="a02837.html#ab024ffa379ac5c5fb8837ebe4b7fcd39">spwndPopupMenu</a>, ppopupMenu-&gt;<a class="code" href="a02837.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>);</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;        <a class="code" href="a03590.html#abc4f96ae1b5b39baaabd801a28a9cc66">xxxMNSelectItem</a>(ppopupMenu, pMenuState, 0);</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        <a class="code" href="a03590.html#af985480dd4d15ff7ae44f1ed6b660717">xxxMNOpenHierarchy</a>(ppopupMenu, pMenuState);</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;        ppopupMenu-&gt;<a class="code" href="a02837.html#a2597cc674546a3204be27a7a83782a72">fToggle</a> = FALSE;</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160; </div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160; </div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160; </div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;<span class="comment">         * Handle ALT-Character sequences for items on top level menu bar.</span></div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;<span class="comment">         * Note that fInsideMenuLoop may be set to false on return from this</span></div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;<span class="comment">         * function if the app decides to return 1 to the WM_MENUCHAR message.</span></div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;<span class="comment">         * We detect this and not enter MenuLoop if fInsideMenuLoop is reset</span></div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;<span class="comment">         * to false.</span></div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;MenuCharHandler:</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;        <a class="code" href="a03590.html#ab35ce0923cfc1ead43ffc9b0fee002c2">xxxMNChar</a>(ppopupMenu, pMenuState, ch);</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;        <span class="keywordflow">if</span> (ppopupMenu-&gt;<a class="code" href="a02837.html#a783d647af1c22968f32f520c9a1a1625">posSelectedItem</a> == MFMWFP_NOITEM) {</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;<span class="comment">             * No selection found.</span></div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;            <span class="keywordflow">goto</span> MenuCancel;</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        }</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    }</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160; </div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    <span class="keywordflow">if</span> (!fLocalInsideMenuLoop &amp;&amp; pMenuState-&gt;<a class="code" href="a02885.html#a0153e6fcd0d8052211d17aa193efeab0">fInsideMenuLoop</a>) {</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;        <a class="code" href="a00785.html#a0b9931c83f17b4ca58a7ceadd026f611">xxxMNLoop</a>(ppopupMenu, pMenuState, 0x7FFFFFFFL, FALSE);</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    }</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160; </div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160; </div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160; </div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;MenuCancel:</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <span class="keywordflow">if</span> (!ppopupMenu-&gt;<a class="code" href="a02837.html#ac77c63f5beb807641133f7edc9f14b5b">fInCancel</a>) {</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;        <a class="code" href="a03590.html#a8217a0141f77655d5a4fdd0aecd5a5fd">xxxMNCancel</a>(ppopupMenu, 0, FALSE, 0);</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    }</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;    <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(!pMenuState-&gt;<a class="code" href="a02885.html#a0153e6fcd0d8052211d17aa193efeab0">fInsideMenuLoop</a> &amp;&amp; !pMenuState-&gt;<a class="code" href="a02885.html#af3cd369288bb4e9881ded64a60470853">fMenuStarted</a>);</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899_source.html#l02247">tagMENUSTATE::fButtonDown</a>, <a class="el" href="a00899_source.html#l01930">tagPOPUPMENU::fInCancel</a>, <a class="el" href="a00899_source.html#l02246">tagMENUSTATE::fInsideMenuLoop</a>, <a class="el" href="a00899_source.html#l01891">tagPOPUPMENU::fIsSysMenu</a>, <a class="el" href="a00899_source.html#l02244">tagMENUSTATE::fMenuStarted</a>, <a class="el" href="a00899_source.html#l01897">tagPOPUPMENU::fToggle</a>, <a class="el" href="a00794_source.html#l00025">MNPositionSysMenu()</a>, <a class="el" href="a00899_source.html#l01973">tagPOPUPMENU::posSelectedItem</a>, <a class="el" href="a00899_source.html#l01954">tagPOPUPMENU::spmenu</a>, <a class="el" href="a00899_source.html#l01956">tagPOPUPMENU::spmenuAlternate</a>, <a class="el" href="a00899_source.html#l01936">tagPOPUPMENU::spwndNotify</a>, <a class="el" href="a00899_source.html#l01941">tagPOPUPMENU::spwndPopupMenu</a>, <a class="el" href="a00950_source.html#l00117">UserAssert</a>, <a class="el" href="a03605_source.html#l00067">xxxMessageBeep()</a>, <a class="el" href="a03590_source.html#l01977">xxxMNCancel()</a>, <a class="el" href="a03590_source.html#l00241">xxxMNChar()</a>, <a class="el" href="a03590_source.html#l01313">xxxMNCloseHierarchy()</a>, <a class="el" href="a00785_source.html#l00466">xxxMNLoop()</a>, <a class="el" href="a03590_source.html#l00797">xxxMNOpenHierarchy()</a>, <a class="el" href="a03590_source.html#l01563">xxxMNSelectItem()</a>, <a class="el" href="a00794_source.html#l00483">xxxMNStartState()</a> , 以及 <a class="el" href="a03590_source.html#l00091">xxxMNSwitchToAlternateMenu()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00875_source.html#l00198">xxxSysCommand()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa03590_html_abc4f96ae1b5b39baaabd801a28a9cc66"><div class="ttname"><a href="a03590.html#abc4f96ae1b5b39baaabd801a28a9cc66">xxxMNSelectItem</a></div><div class="ttdeci">PITEM xxxMNSelectItem(PPOPUPMENU ppopupmenu, PMENUSTATE pMenuState, UINT itemPos)</div><div class="ttdef"><b>Definition:</b> <a href="a03590_source.html#l01563">kernel/menu.c:1563</a></div></div>
<div class="ttc" id="aa00785_html_a0b9931c83f17b4ca58a7ceadd026f611"><div class="ttname"><a href="a00785.html#a0b9931c83f17b4ca58a7ceadd026f611">xxxMNLoop</a></div><div class="ttdeci">int xxxMNLoop(PPOPUPMENU ppopupmenu, PMENUSTATE pMenuState, LONG lParam, BOOL fDblClk)</div><div class="ttdef"><b>Definition:</b> <a href="a00785_source.html#l00466">mnloop.c:466</a></div></div>
<div class="ttc" id="aa02621_html"><div class="ttname"><a href="a02621.html">tagITEM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01958">user.h:1958</a></div></div>
<div class="ttc" id="aa02621_html_add79d19081e05aa07fece764c9cc07b5"><div class="ttname"><a href="a02621.html#add79d19081e05aa07fece764c9cc07b5">tagITEM::yItem</a></div><div class="ttdeci">DWORD yItem</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01975">user.h:1975</a></div></div>
<div class="ttc" id="aa02837_html_a472df270c88db7755093cd3ca1d1dee6"><div class="ttname"><a href="a02837.html#a472df270c88db7755093cd3ca1d1dee6">tagPOPUPMENU::spwndNotify</a></div><div class="ttdeci">struct tagWND * spwndNotify</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01936">userk.h:1936</a></div></div>
<div class="ttc" id="aa02621_html_a1d342ea14e69d5eb171aa039c9bc4642"><div class="ttname"><a href="a02621.html#a1d342ea14e69d5eb171aa039c9bc4642">tagITEM::cch</a></div><div class="ttdeci">DWORD cch</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01972">user.h:1972</a></div></div>
<div class="ttc" id="aa03605_html_a4f1ae6130c5b61d08ef3cb8156d87333"><div class="ttname"><a href="a03605.html#a4f1ae6130c5b61d08ef3cb8156d87333">xxxMessageBeep</a></div><div class="ttdeci">BOOL xxxMessageBeep(UINT dwType)</div><div class="ttdef"><b>Definition:</b> <a href="a03605_source.html#l00067">kernel/msgbeep.c:67</a></div></div>
<div class="ttc" id="aa02885_html_a0153e6fcd0d8052211d17aa193efeab0"><div class="ttname"><a href="a02885.html#a0153e6fcd0d8052211d17aa193efeab0">tagMENUSTATE::fInsideMenuLoop</a></div><div class="ttdeci">DWORD fInsideMenuLoop</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02246">userk.h:2246</a></div></div>
<div class="ttc" id="aa02885_html_a46148f45192618de6eafbf70310e2aee"><div class="ttname"><a href="a02885.html#a46148f45192618de6eafbf70310e2aee">tagMENUSTATE::fButtonDown</a></div><div class="ttdeci">DWORD fButtonDown</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02247">userk.h:2247</a></div></div>
<div class="ttc" id="aa00953_html_a392e62da233ed3e2f7c3fd4f487a3896"><div class="ttname"><a href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a></div><div class="ttdeci">int INT</div><div class="ttdef"><b>Definition:</b> <a href="a00953_source.html#l00006">bench.c:6</a></div></div>
<div class="ttc" id="aa02837_html_ad680eabbc65eb4d160362e2c73a19994"><div class="ttname"><a href="a02837.html#ad680eabbc65eb4d160362e2c73a19994">tagPOPUPMENU::spmenu</a></div><div class="ttdeci">struct tagMENU * spmenu</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01954">userk.h:1954</a></div></div>
<div class="ttc" id="aa00782_html_a7379c189876b00e2e991b2171dd0264a"><div class="ttname"><a href="a00782.html#a7379c189876b00e2e991b2171dd0264a">MNFindNextValidItem</a></div><div class="ttdeci">UINT MNFindNextValidItem(PMENU pMenu, int i, int dir, UINT flags)</div><div class="ttdef"><b>Definition:</b> <a href="a00782_source.html#l00034">mnkey.c:34</a></div></div>
<div class="ttc" id="aa00371_html_a162a73e20dfabca084a3ebb4581631a8"><div class="ttname"><a href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a></div><div class="ttdeci">#define UserAssert(exp)</div><div class="ttdef"><b>Definition:</b> <a href="a00950_source.html#l00117">usersrv.h:117</a></div></div>
<div class="ttc" id="aa02621_html_a8ddffda03875be635307092e985f7066"><div class="ttname"><a href="a02621.html#a8ddffda03875be635307092e985f7066">tagITEM::lpstr</a></div><div class="ttdeci">LPWSTR lpstr</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01966">user.h:1966</a></div></div>
<div class="ttc" id="aa00794_html_ab74bfcb3daae3ba0497d19d263c8a7f0"><div class="ttname"><a href="a00794.html#ab74bfcb3daae3ba0497d19d263c8a7f0">xxxMNStartState</a></div><div class="ttdeci">BOOL xxxMNStartState(PPOPUPMENU ppopupmenu, int mn)</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00483">mnstate.c:483</a></div></div>
<div class="ttc" id="aa03590_html_a8217a0141f77655d5a4fdd0aecd5a5fd"><div class="ttname"><a href="a03590.html#a8217a0141f77655d5a4fdd0aecd5a5fd">xxxMNCancel</a></div><div class="ttdeci">void xxxMNCancel(PPOPUPMENU ppopupmenu, UINT cmd, BOOL fSend, LONG lParam)</div><div class="ttdef"><b>Definition:</b> <a href="a03590_source.html#l01977">kernel/menu.c:1977</a></div></div>
<div class="ttc" id="aa02837_html_a2597cc674546a3204be27a7a83782a72"><div class="ttname"><a href="a02837.html#a2597cc674546a3204be27a7a83782a72">tagPOPUPMENU::fToggle</a></div><div class="ttdeci">DWORD fToggle</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01897">userk.h:1897</a></div></div>
<div class="ttc" id="aa00794_html_a4c87c0ec6c754e9cd7e4aea0b3b5ce41"><div class="ttname"><a href="a00794.html#a4c87c0ec6c754e9cd7e4aea0b3b5ce41">MNPositionSysMenu</a></div><div class="ttdeci">void MNPositionSysMenu(PWND pwnd, PMENU pmenusys)</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00025">mnstate.c:25</a></div></div>
<div class="ttc" id="aa02837_html_ae51e1bffcb852e729841b4bb15ed17fc"><div class="ttname"><a href="a02837.html#ae51e1bffcb852e729841b4bb15ed17fc">tagPOPUPMENU::fIsSysMenu</a></div><div class="ttdeci">DWORD fIsSysMenu</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01891">userk.h:1891</a></div></div>
<div class="ttc" id="aa03590_html_a276dfb2dab9aac12e50a66342a9e68e7"><div class="ttname"><a href="a03590.html#a276dfb2dab9aac12e50a66342a9e68e7">xxxMNCloseHierarchy</a></div><div class="ttdeci">void xxxMNCloseHierarchy(PPOPUPMENU ppopupmenu, PMENUSTATE pMenuState)</div><div class="ttdef"><b>Definition:</b> <a href="a03590_source.html#l01313">kernel/menu.c:1313</a></div></div>
<div class="ttc" id="aa03590_html_a834af03196c61def0034c6d4b825efd9"><div class="ttname"><a href="a03590.html#a834af03196c61def0034c6d4b825efd9">xxxMNSwitchToAlternateMenu</a></div><div class="ttdeci">BOOL xxxMNSwitchToAlternateMenu(PPOPUPMENU ppopupmenu)</div><div class="ttdef"><b>Definition:</b> <a href="a03590_source.html#l00091">kernel/menu.c:91</a></div></div>
<div class="ttc" id="aa02621_html_aeeb0fd843d821837779407bbd8ece0cf"><div class="ttname"><a href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">tagITEM::hTypeData</a></div><div class="ttdeci">HANDLE hTypeData</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01968">user.h:1968</a></div></div>
<div class="ttc" id="aa02837_html_ab024ffa379ac5c5fb8837ebe4b7fcd39"><div class="ttname"><a href="a02837.html#ab024ffa379ac5c5fb8837ebe4b7fcd39">tagPOPUPMENU::spwndPopupMenu</a></div><div class="ttdeci">struct tagWND * spwndPopupMenu</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01941">userk.h:1941</a></div></div>
<div class="ttc" id="aa02625_html_a3bf37b161e5822f38a2b0bc722c5ac50"><div class="ttname"><a href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">tagMENU::cItems</a></div><div class="ttdeci">UINT cItems</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02000">user.h:2000</a></div></div>
<div class="ttc" id="aa03590_html_af985480dd4d15ff7ae44f1ed6b660717"><div class="ttname"><a href="a03590.html#af985480dd4d15ff7ae44f1ed6b660717">xxxMNOpenHierarchy</a></div><div class="ttdeci">PWND xxxMNOpenHierarchy(PPOPUPMENU ppopupmenu, PMENUSTATE pMenuState)</div><div class="ttdef"><b>Definition:</b> <a href="a03590_source.html#l00797">kernel/menu.c:797</a></div></div>
<div class="ttc" id="aa02885_html_af3cd369288bb4e9881ded64a60470853"><div class="ttname"><a href="a02885.html#af3cd369288bb4e9881ded64a60470853">tagMENUSTATE::fMenuStarted</a></div><div class="ttdeci">DWORD fMenuStarted</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02244">userk.h:2244</a></div></div>
<div class="ttc" id="aa02621_html_a7e2f0bd56b29ee245667384d07a03544"><div class="ttname"><a href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">tagITEM::hbmp</a></div><div class="ttdeci">HBITMAP hbmp</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01983">user.h:1983</a></div></div>
<div class="ttc" id="aa02837_html_afbdbf15c6bd60bf9bb21f2f0340c1d14"><div class="ttname"><a href="a02837.html#afbdbf15c6bd60bf9bb21f2f0340c1d14">tagPOPUPMENU::spmenuAlternate</a></div><div class="ttdeci">struct tagMENU * spmenuAlternate</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01956">userk.h:1956</a></div></div>
<div class="ttc" id="aa02837_html_a783d647af1c22968f32f520c9a1a1625"><div class="ttname"><a href="a02837.html#a783d647af1c22968f32f520c9a1a1625">tagPOPUPMENU::posSelectedItem</a></div><div class="ttdeci">UINT posSelectedItem</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01973">userk.h:1973</a></div></div>
<div class="ttc" id="aa03590_html_ab35ce0923cfc1ead43ffc9b0fee002c2"><div class="ttname"><a href="a03590.html#ab35ce0923cfc1ead43ffc9b0fee002c2">xxxMNChar</a></div><div class="ttdeci">void xxxMNChar(PPOPUPMENU ppopupmenu, PMENUSTATE pMenuState, UINT character)</div><div class="ttdef"><b>Definition:</b> <a href="a03590_source.html#l00241">kernel/menu.c:241</a></div></div>
<div class="ttc" id="aa02621_html_a1bd951bbc5c909b8bd138b83ddfe31bd"><div class="ttname"><a href="a02621.html#a1bd951bbc5c909b8bd138b83ddfe31bd">tagITEM::xItem</a></div><div class="ttdeci">DWORD xItem</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01974">user.h:1974</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa02625_html_ae6172b08ed30615d88290ea4b4b6a70c"><div class="ttname"><a href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">tagMENU::rgItems</a></div><div class="ttdeci">PITEM rgItems</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02005">user.h:2005</a></div></div>
<div class="ttc" id="aa02837_html_ac77c63f5beb807641133f7edc9f14b5b"><div class="ttname"><a href="a02837.html#ac77c63f5beb807641133f7edc9f14b5b">tagPOPUPMENU::fInCancel</a></div><div class="ttdeci">DWORD fInCancel</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01930">userk.h:1930</a></div></div>
<div class="ttc" id="aa00782_html_a62c64e13711fe7f194b1fe96b7ef702f"><div class="ttname"><a href="a00782.html#a62c64e13711fe7f194b1fe96b7ef702f">xxxClientFindMnemChar</a></div><div class="ttdeci">int xxxClientFindMnemChar(PUNICODE_STRING pstrSrc, WCHAR ch, BOOL fFirst, BOOL fPrefix)</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_2a0a56546b70a0973705719e6a88eab3.html">kernel</a></li><li class="navelem"><a class="el" href="a00782.html">mnkey.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
